package com.dmj.sqldsl.builder;

import com.dmj.sqldsl.builder.table.EntityBuilder;
import lombok.Getter;
import java.util.Collection;

@Getter
public class InsertBuilder<T> {

  private final EntityBuilder entityBuilder;

  private InsertBuilder(EntityBuilder entityBuilder) {
    this.entityBuilder = entityBuilder;
  }

  public static <T> InsertBuilder<T> into(Class<T> entityClass) {
    return new InsertBuilder<>(new EntityBuilder(entityClass));
  }

  public InsertSelectBuilder<T> query(DslQueryBuilder queryBuilder) {
    return new InsertSelectBuilder<>(this, queryBuilder);
  }

  public InsertValuesBuilder<T> values(Collection<T> values) {
    return new InsertValuesBuilder<>(this, values);
  }
}
